﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc.Html;
using SharpDom;
using SharpDom.Mvc;

namespace Bzure.Apps.Security.Views
{
    public class PublicMaster : SiteMaster
    {
        public override ContainerTag CreateTagTree(ContainerTag container)
        {
            return container
            [
                html.attr(xmlns: "http://www.w3.org/1999/xhtml")
                [
                    head
                    [
                        title[PlaceHolder(TitleContent)],
                        link.attr(href: Url.RouteUrl("ResourceAccess_Image", new { location = "SecurityApp", id = "favicon.ico" })).ext("rel", "shortcut icon").ext("type", "image/x-icon"),
                        link.attr(href: Url.RouteUrl("ResourceAccess_Image", new { location = "SecurityApp", id = "favicon.ico" }), rel: LinkType.bookmark),
                        link.attr(href: Url.RouteUrl("ResourceAccess_CSS", new { location = "SecurityApp", id = "public.css" }), rel: LinkType.stylesheet, type: MimeType.text.css),
                        link.attr(href: Url.RouteUrl("ResourceAccess_CSS", new { location = "SecurityApp", id = "External.css" }), rel: LinkType.stylesheet, type: MimeType.text.css),
                        script.attr(type: MimeType.text.javascript, src: Url.RouteUrl("ResourceAccess_Script", new { location = "SecurityApp", id = "jquery-1.7.2.min.js" }))
                    ],
                    body
                    [
                    div[
                          PlaceHolder(MainContent),
                          p.attr(id: "credits")[
                                                       "&copy;2012 倍速软件&nbsp;&nbsp;",
                                                       strong["通用权限管理"],
                                                       br,
                                                       a.attr(href: "http://www.bzure.cn")["www.bzure.cn"]]
                         ]
                    ]
                ]
            ];
        }
    }
}
